{extend  name="manage@public/layout" /}
{block name="content"}
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>资金变更记录</h5>
                       
                        <div class="ibox-tools">
                            <a class="collapse-link" onclick="location.replace(location.href);">
                                <i class="fa fa-refresh"></i>
                            </a>
                        </div>
                    </div>
                    <div class="ibox-content">
                        <div class="table-responsive">
                            <!--- 搜索--->
                            <form action="" method="POST">
                                <div class="col-sm-2 col-sm-on">
                                    <select name="type" class="input-sm form-control input-s-sm inline">
                                        <option value="0">类型</option>
                                        <option  value="1" {notempty name="data.type"}{eq name="data['type']" value="1"}selected{/eq}{/notempty} >手动增加</option>
                                        <option  value="2" {notempty name="data.type"}{eq name="data['type']" value="2"}selected{/eq}{/notempty} >手动减少</option>
                                        <option  value="3" {notempty name="data.type"}{eq name="data['type']" value="3"}selected{/eq}{/notempty} >手动冻结</option>
                                        <option  value="4" {notempty name="data.type"}{eq name="data['type']" value="4"}selected{/eq}{/notempty} >手动解冻</option>
                                        <option  value="5" {notempty name="data.type"}{eq name="data['type']" value="5"}selected{/eq}{/notempty} >代理收益</option>
                                        <!-- <option  value="6" {notempty name="data.type"}{eq name="data['type']" value="6"}selected{/eq}{/notempty} >强制入账</option> -->
                                        <option  value="7" {notempty name="data.type"}{eq name="data['type']" value="7"}selected{/eq}{/notempty} >申请提现</option>
                                        <option  value="8" {notempty name="data.type"}{eq name="data['type']" value="8"}selected{/eq}{/notempty} >提现退款</option>
                                    </select>
                                </div>
                                <div class="col-sm-2 col-sm-on">
                                    <input type="text" value="{notempty name="data.keyword"} {$data['keyword']} {/notempty}" name="keyword" placeholder="订单号" class="input-sm form-control">
                                </div>
                                <div class="col-sm-auto col-sm-4 col-sm-on">
                                    <input style="width:155px;cursor:not-allowed;" placeholder="开始日期" class="input-sm form-control form-control layer-date" name="start" value="{empty name="data['start']"}<?php echo date('Y-m-d 00:00:00',time());?>{else/}{$data.start}{/empty}" readonly id="start"><i style="position: relative;top:5px;">&nbsp;-&nbsp;</i>
                                    <input style="width:155px;cursor:not-allowed;" placeholder="结束日期" class="input-sm form-control form-control layer-date" name="end" value="{empty name="data['end']"}<?php echo date('Y-m-d H:i:s',time());?>{else/}{$data.end}{/empty}" readonly id="end">
                                </div>
                                <div class="col-sm-1 col-sm-botton">
                                    <div class="input-group">
                                        <button title="搜索" type="submit" class="btn btn-sm btn-primary"><i class="fa fa-search"></i></button> 
                                    </div>
                                </div>
                                <div class="col-sm-1 col-sm-botton">
                                    <div class="input-group">
                                        <button title="导出" type="submit" class="btn btn-sm btn-primary"><i class="fa fa-download"></i></button>
                                    </div>
                                </div>
                            </form>
                            <!--- end --->
                            <table class="table table-striped table-bordered">
                                <thead>
                                    <tr>
                                        <th>ID</th>
                                     
                                        <th>订单号</th>
                                        <th>变更金额</th>
                                        <th>变更后余额</th>
                                        <th>类型</th>
                                        <th>备注</th>
                                        <th>创建时间</th>
                                        
                                    </tr>
                                </thead>
                                <tbody>
                                    {volist name="list" id="vo"}
                                    <tr>
                                        <td>{$vo.id}</td>
                                        <td>{$vo.order_sn|default='---'}</td>
                                        <td>{$vo.balance|abs}</td>
                                        <td>{$vo.total_balance|abs}</td>
                                        <td>
                                            {switch vo.type }
                                                {case 1 }<i class="fa fa-circle text-info"></i>&nbsp;手动增加{/case}
                                                {case 2}<i class="fa fa-circle text-warning"></i>&nbsp;手动减少{/case}
                                                {case 3}<i class="fa fa-circle text-warning"></i>&nbsp;手动冻结{/case}
                                                {case 4}<i class="fa fa-circle text-info"></i>&nbsp;手动解冻{/case}
                                                {case 6}<i class="fa fa-circle text-info"></i>&nbsp;代理收益{/case}
                                                {case 7}<i class="fa fa-circle text-warning"></i>&nbsp;提现申请{/case}
                                                {case 8}<i class="fa fa-circle text-info"></i>&nbsp;提现失败,退款{/case}
                                                {default /}<i class="fa fa-circle text-navy"></i>&nbsp;
                                            {/switch}
                                        </td>
                                        <td>{$vo.remark}</td>
                                        <td>{$vo.create_time}</td>
                                        
                                    </tr>
                                    {/volist}
                                </tbody>
                            </table>
                            <div style="float:right;" class="dataTables_paginate paging_simple_numbers" id="DataTables_Table_0_paginate">
                                {$page|raw}
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div> 
    <input type='hidden' name="st_start" value="<?php echo date('Y-m-d 00:00:00',strtotime('-7 days'))?>" />
    <input type='hidden' name="st_end" value="<?php echo date('Y-m-d 23:59:59',time());?>" />

{/block}
    {block name="script"}
<script>
    //时间插件
    var start = {
        elem:"#start",
        format:"YYYY-MM-DD hh:mm:ss",
        min:$("input[name='st_start']").val(),
        max:$("input[name='st_end']").val(),
        istime:true,
    };
    var end = {
        elem:"#end",
        format:"YYYY-MM-DD hh:mm:ss",
        min:$("input[name='st_start']").val(),
        max:$("input[name='st_end']").val(),
        istime:true,
    };
    laydate(start);laydate(end);
    
</script>
{/block}
